<script>
	import { initSocket } from '@/socket/index'
	import { useUserStoreHook } from '@/stores/modules/user'
	import { useLivePusherStoreHook } from '@/stores/modules/livePusher'
	
	const useUserStore = useUserStoreHook()
	const useLivePusherStore = useLivePusherStoreHook()
	
	export default {
		onLaunch: () => {
			initSocket.connect()
			uni.getStorage({
				key: 'USER_INFO',
				success: (res) => {
					useUserStore.SET_USERINFO(JSON.parse(res.data))
				}
			});
		},
		onShow: () => {
			console.log('App Show')
		},
		onHide: () => {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
/*每个页面公共css */
@import "@/common/common.scss";

// 全部背景
// $all-bg-color
page {
	background-color: $all-bg-color;
}

</style>
